﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace ZiChen.SoXunLeiPan.ViewModel
{
    public class FileItem : INotifyPropertyChanged
    {
        public string Md5 { get; set; } = Guid.NewGuid().ToString("N");
        public string ParentId { get; set; }
        public string Title { get; set; }
        public string Size { get; set; }
        public string Ext { get; set; }
        public string ShareLink { get; set; }
        public string SharePass { get; set; }
        public int HitNum { get; set; }
        public DateTime Date { get; set; }
        public string Modified { get; set; }

        public bool IsDirectory { get; set; }

        // 图标逻辑
        public string Icon => IsDirectory ? "📁" : "📄";

        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}